import java.rmi.RemoteException;

import dbExceptions.DataBaseErrorException;
import article.entities.ArticleVO;
import article.entities.CategoryVO;
import article.entities.IngredientVO;
import article.exceptions.BadArticleException;
import article.exceptions.BadCategoryException;
import article.exceptions.IncompleteArticleException;
import article.exceptions.MissingArticleException;
import article.exceptions.MissingCategoryException;
import article.exceptions.NotHereException;
import service.ServiceFacade;
import service.article.exceptions.ProxyException;
import service.article.interfaces.ArticleProxyMgt;

public class TestMainNacho {

	public static void main(String[] args) throws RemoteException,
			NotHereException, ProxyException, IncompleteArticleException,
			MissingArticleException, BadArticleException,
			DataBaseErrorException, MissingCategoryException,
			BadCategoryException {
		ArticleProxyMgt aux = ServiceFacade.getInstance().getArticleProxyMgt();
		ArticleVO[]	temp = aux.getArticles();
		
		
		aux.newCategory("Pizza");
		aux.newCategory("Chivito");

		aux.newIngredient("Salsa de Soja");
		aux.newIngredient("Tallarines");
		aux.newIngredient("Salsa de Tomate");
		aux.newIngredient("Muzzarela");
		IngredientVO[] temp2 = aux.getAllIngredients();
		CategoryVO[] temp3 = aux.getCategories();
		IngredientVO[] add = {temp2[0],temp2[1]};
		
//		aux.updateArticle(new ArticleVO("Ensalada Rusa","Con papa y mallonesa",temp[1].getPrimaryKey(), 35,temp[1].getIngr(),temp[1].getCat()));
//		//aux.deleteArticle(artDel);
		aux.addArticle(new ArticleVO("Noodles", "Tallarines chinos", 252, add , temp3[0]));
//		aux.deleteArticle(temp[2]);		
		
		
		System.out.print("hullo");
	
	}

}
